package practice;

public class ExId {
    public static int counter=0;
    private int id;
    public static int modify(){
        counter=counter+3;
        return counter;
    }

    public ExId(){
        id=++counter;

    }

    public int getId(){
        return id;
    }


    public static void main(String[] args) {
        ExId a=new ExId();
        System.out.println(a.getId());
        ExId b=new ExId();
        System.out.println(b.getId());
        ExId c=new ExId();
        System.out.println(c.getId());


        ExId d=new ExId();
        System.out.println(d.modify());
        ExId e=new ExId();System.out.println(e.modify());
        ExId f=new ExId();System.out.println(f.modify());
        ExId g=new ExId();System.out.println(g.modify());
//        System.out.println(a.getId());
//        System.out.println(b.getId());
//        System.out.println(c.getId());
//        System.out.println(d.getId());
    }


}
